package com.wh.music.dao;

import com.github.pagehelper.Page;
import com.wh.music.POJO.Singer;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
public interface SingerMapper {
  /**
   *增加
   */
  public int insertsinger(Singer singer);

  /**
   *修改
   */
  public int updatesinger(Singer singer);

  /**
   * 删除
   * @param id
   */
  public int deletesinger(Long id);

  public int deletesingers(List<Long> ids);
  /**
   * 根据主键查询整个对象
   */
  public Singer selectByPrimaryKey(Long id);

  /**
   * 查询所有歌手
   */
  public List<Singer> allSinger();

  public Page<Singer> findByPage(String name);

  public Integer countSingers(String name);
  /**
   * 根据歌手名字模糊查询列表
   */
  public List<Singer> singerOfName(String name);

  /**
   * 根据性别查询
   */
  public List<Singer> singerOfSex(Integer sex);
}
